package com.jianganming.netty.rpc.consumer;

import com.jianganming.netty.rpc.api.IRpcHelloService;
import com.jianganming.netty.rpc.api.IRpcService;

import javax.xml.transform.Source;

public class RpcConsumer {
    public static void main(String[] args) {
        RpcProxy rpcProxy = new RpcProxy();
        IRpcHelloService rpcHello = rpcProxy.create(IRpcHelloService.class);
        String s = rpcHello.hello("江安明");
        System.out.println(s);

        IRpcService rpcService = rpcProxy.create(IRpcService.class);
        int sum = rpcService.add(7, 9);
        System.out.println(sum);

    }
}
